import http from "./http";

export default {
  // 分页获取业主
  getUserPage(params) {
    return http.post("/user/getUserPage", params);
  },
  // 添加业主
  addUser(params) {
    return http.post("/user/addUser", params);
  },
  // id获取业主
  getUserById(params) {
    return http.get("/user/getUserById", { params });
  },
  //   修改业主
  editUser(params) {
    return http.put("/user/updateUser", params);
  },
  //   删除业主
  deleteUser(params) {
    return http.delete("/user/deleteUser", { params });
  },
  /**
   * @description 获取用户房间
   */
  getRoomByUserId(params) {
    return http.get("/roomUser/getUserOwnRoom", { params });
  },
  /**
   * @description 用户购房
   */
  addRoomByUser(params) {
    return http.post("/roomUser/addRoomUser", params);
  },
  /**
   * @description 获取所有未售房屋
   */
  getAllRoom() {
    return http.get("/roomUser/getAllNotShellRoom");
  },
  /**
   * @description 删除房子
   */
  deleteRoom(params) {
    return http.delete("/roomUser/deleteRoomUser", { params });
  },
  /**
   * @description 获取用户车位
   */
  getStallByUserId(params) {
    return http.get("/userStall/getUserOwnStall", { params });
  },
  /**
   * @description 用户购车位
   */
  addStallByUser(params) {
    return http.post("/userStall/addUserStall", params);
  },
  /**
   * @description 获取所有未售车位
   */
  getAllStall() {
    return http.get("/userStall/getAllNotShellStall");
  },
  /**
   * @description 删除车位
   */
  deleteStall(params) {
    return http.delete("/userStall/deleteUserStall", { params });
  }
};
